﻿using MOD_TaiYangQiu.business;
using MOD_TaiYangQiu.common;
using MOD_TaiYangQiu.config;
using System;
using UnhollowerRuntimeLib;

/// <summary>
/// 当你手动修改了此命名空间，需要去模组编辑器修改对应的新命名空间，程序集也需要修改命名空间，否则DLL将加载失败！！！
/// </summary>
namespace MOD_TaiYangQiu
{
    /// <summary>
    /// 此类是模组的主类
    /// </summary>
    public class ModMain
    {
        CoupleUpgrade coupleUpgrade = new CoupleUpgrade();
        /// <summary>
        /// MOD初始化，进入游戏时会调用此函数
        /// </summary>
        public void Init()
        {

            LogUtil.Init();
            LogUtil.Log("太阳球MOD", "模组初始化");
            BaseConfig.Init();
            InitConfig.Init();
            Action action = () =>
            {
                g.world.run.On(WorldRunOrder.End, new Action(MonthlyStatement));
            };
            g.events.On(EGameType.IntoWorld, action, 1, false);
            LogUtil.Log("太阳球MOD", "模组加载完成");
        }
        /// <summary>
        /// 每帧调用的函数
        /// </summary>
        private void OnUpdate()
        {

        }

        /// <summary>
        /// MOD销毁，回到主界面，会调用此函数并重新初始化MOD
        /// </summary>
        public void Destroy()
        {

        }
        public void MonthlyStatement()
        {

            coupleUpgrade.WelfareBenefits();
        }
    }
}
